home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk169 / viruscheck / virus_checker.doc < prev    next >
Text File  |  1995-03-19  |  21KB  |  426 lines

  1. Virus Checker
  2.  
  3.    This Program
  4.  
  5. Virus_Checker is a freely distributable, copyrighted piece of software.
  6. You do not have to pay money to use it, and may upload it wherever you
  7. choose, but you are not allowed to sell Virus_Checker for profit, or
  8. include Virus_Checker on a disk which is sold for profit, without the
  9. author's (John Veldthuis) permission.
  10. Commodore New Zealand Have this permission already
  11. I can be contacted at the address below.
  12.  
  13. Please   send me any more viruses so I can update Virus_Checker
  14.  
  15. John Veldthuis
  16. 21 Ngatai Street
  17. Manaia, Taranaki
  18. New Zealand
  19. Phone  (0624) 8409
  20.  
  21. To use, place in your startup-sequence the following line
  22.  
  23. Virus_Checker
  24.  
  25. this will run virus_checker
  26. upon running Virus_Checker will first check your memory for viruses
  27. and tell you if any where detected. They will either be removed or
  28. disabled. Next all disks in the drives will be checked. Any disk put
  29. into any drive (df0: to df3:) will be checked. The rest is easy
  30. Sometimes the machine may GURU when it disables the LAMER Exterminator
  31. virus in memory but if you reboot it should be gone.
  32.  
  33. Virus Checker will check the startup-sequence file for the Xeno virus. If
  34. it finds this virus it will let you check all the files on any drive for
  35. the virus. If you want to check a disk for this virus then put the disk in
  36. any drive. Make sure the Virus_Checker window is active the press and
  37. release the right mouse button. This will bring up a requester asking you
  38. which drive to check. Enter the drive name in the box, eg. DF0:, DH1:,RAD:
  39. etc.  It will then check all the files on that drive. You can also enter
  40. directories if you want to eg, c: df0:c, df0:libs etc
  41.  
  42. If Virus_Checker brings a requester up that says a program just run has
  43. infected your memory with the Xeno Virus, it has already disabled it.
  44. You should immediatly check all files on the disks that are in the drives
  45. at that time. This means that a program that you just ran or a program
  46. some other program just ran is infected with the virus and all files
  47. should be checked to find out which one it was.
  48.  
  49. With viruses which use a RomTag I have decided to clear out all RomTags to
  50. make sure I remove the Viruses from the list. In doing this you will lose
  51. things like Recoverable ram disks such as RAD:, VD0: etc. If You have a
  52. virus make sure that you save anything in the ram disks that you want
  53. before rebooting. The ramdisks and others will disappear on a reboot.
  54. My policy is better safe than sorry.
  55.  
  56. V1.0  was an arp.library version
  57. V1.1  was an port to the normal libraries
  58. V1.2  had the ByteBandit virus detection added into it
  59. V1.3  had detection of the 3 Viruses in memory and removal of them
  60. V1.4  added code to detect + remove the Byte Warrior Virus from memory
  61.       and disk
  62. V1.41 found a slight bug when using DSM to disassemble this
  63.       the program was testing low memory instead of a value when
  64.       checking for the Revenge Virus
  65. V1.42 changed code to be assembled by the CAPE 68K assembler
  66.       which is much faster than A68k or Assem. Now also uses base register
  67.       addressing mode for data access
  68. V1.43 changed code to cut down executable code
  69. V2.0  added Pentagon, System Z, North Star, Obelisk and the
  70.       new IRQ virus which lives in files and not in the Boot Block
  71. V2.1  corrected a few little bugs in program
  72. V3.0  Did a listing of Source code and found many bugs
  73.       Did a major rewrite to clean it up and saved about 400 bytes
  74. V3.0  now checks for the viruses listed
  75.       SCA, AEK, Byte Bandit, Byte Warrior, Revenge, Pentagon Circle
  76.       System Z, North Star, Obelisk, Disk-Doktors and the latest IBM
  77.       type virus the IRQ virus.
  78. V3.01 got a new virus. Lamer Exterminator. added code to get rid of it
  79. V3.02 got a second Version of the LAmer Exterminator virus
  80. V3.03 After many requests decided to add checking of BootGirl
  81.       BootBlocks which where being registered as Non-Standard. It now
  82.       Just Ignores BootGirl BootBlocks
  83. V4.00 Updated to make better use of the Stack. Now store all variables
  84.       on the stack for a saving of 124 bytes in the Executable
  85. V4.10 TimeBomb virus added to code
  86. V4.20 Altered startup code to start a separate process to avoid doing
  87.       a RunBack -2 Virus_checker
  88. V4.22 Added Gadaffi virus to checker
  89. V4.23 Found a potentially Fatal Error in Code When accessing Unit
  90.       Byte off the Stack.
  91. V4.24 Added Graffiti, Ultra Fox, and Phantasmumble Viruses
  92.       Don't actually have these last 3 viruses so Anyone please send them
  93.       To me if you find them. Still looking for the IRQ Virus as well
  94. V4.25 Added BSG9 virus to code
  95. V4.26 Changed Error Checking on BSG9 virus abit
  96. V4.27 Got the War Hawks virus and added it. Also added V3 of Lamer
  97.       exterminator virus. Changed checking for BSG9 virus. Now checks
  98.       when disk is inserted into drive
  99. V4.28 Found I was losing the memory that was used by the program when
  100.       it exited. This was caused by me not UnLoading the Segment used for
  101.       The program. Fixed
  102. V4.29 Found program got into a continuous loop when there where no RomTags
  103.       present in the system. Fixed
  104.       Also cut code size down abit more by combining a few checks
  105. V4.30 Put further checking in for the BSG9 virus as sometimes the checker
  106.       would not find the file on the disk depending on which directory
  107.       it was in. Put VKill virus checking in
  108.       Also Ultra Fox and PVLProtector virus checking in
  109. V4.40 Put in DosSpeed virus and an Unknown virus.It does not have any names 
  110.       at all
  111. V4.41 Stopped Requester that comes up after pulling disk out. 
  112. V4.42 Added JITR virus which was sent to me by Jonathan Potter (AUST)
  113. V4.43 Added MicroSystems virus checking to code
  114.       and BootBlock checking of the HCS II, Opapa, BackFlash, and
  115.       Australian Parasite viruses
  116. V4.44 Changed code around abit to get better use of tables
  117.       and added Xeno virus check for Memory only
  118. V5.00 Changed user interface to give a new look and better messages
  119. V5.01 Major Bug repaired. V5.00 GURU'ed when checking disk. Worked with
  120.       68020 CPU but failed on standard Amiga's due to a bad address.
  121. V5.02 Was not checking startup-sequence properly when disk was put in 
  122.       3 1/2" drive when a filename was given as C:SetCPU or something like
  123.       that. Came up with a strange filename not being checked. Fixed
  124.       Added second version of Byte Bandit Virus, Someone hacked it
  125.       Added code to remove Xeno virus from files
  126. V5.03 Slight bug corrected in code
  127. V5.04 Have changed this from PD to Freely Redistributable after an offer
  128.       from someone to sell Virus_Checker. I feel this still needs to be
  129.       at minimal (copying charge) or no charge to be effective.
  130.       Also cleaned up the code abit. This may introduce new bugs so
  131.       please tell me about them if you find them
  132.       Added checking of IRQ virus when checking for Xeno files on disk.
  133.       As the file is in the buffer already this adds very litle extra
  134.       time to the check. And better safe than sorry.
  135. V5.05 Changed text when Xeno Virus found after a program has been run
  136.       to warn that the program just run maybe the culprit
  137. V5.06 Added 16 Bit crew Virus, New Alien Beat Virus, Digital Emotions
  138.       virus, Graffiti Virus, two new versions of the Byte Bandit virus,
  139.       ScarFace virus, Turk virus, Joshua virus
  140.       Also a little bug when used with NTSC machines. You could not display
  141.       the Boot Block Sectors. Now Startup alters for which machine it is
  142.       on. The Startup code is only used once and then the memory for it
  143.       is freed.
  144.  
  145. ************************************************************************
  146. V5.07 Added better Error messages when an error occurs with Files.
  147.       It will now say File protected from deletion when the file is
  148.       protected instead of just saying could not open file.
  149.       Added Butonic virus to checker
  150. V5.08 Added Centurions virus to checker
  151.  
  152. ************************************************************************
  153.  
  154. NON-STANDARD BOOT CODE
  155.  - When Virus_Checker brings up a Requester that says the disk has
  156. non-standard boot code this means that the code in the boot block is not
  157. what should be there. This does not mean that it is a virus as many games
  158. use copy protection in their boot blocks. You should however be cautious if
  159. it is not a game. Do not replace the boot block if you are not sure. If
  160. something strange happens then please send a copy of the disk to me so that
  161. I can check it out.
  162. Here is a way of checking non-standard boot code
  163.  
  164. 1.      Format a blank disk so you know it is clear.
  165. 3.      Make sure all disks except the one just formated are write protected
  166. 3.      Boot from the disk that you suspect.
  167. 4.      Place formatted disk in drive zero and then reboot.
  168. 5.      Take disk out of drive zero and turn off computer for about 30 secs.
  169. 6.      Run the Virus_Checker program. If the Virus_Checker finds
  170.         non-standard boot code on the newly formated disk you have found a
  171.         new virus. Please send it to me
  172.  
  173.   Viruses Dealt With:
  174.   -------------------
  175.  
  176. SCA
  177.  - The SCA is the simplest virus to deal with, as it's notactually DOING
  178. anything except hiding in memory, until you reboot.  We just look at
  179. CoolCapture and fix it to get it out of RAM.
  180.  
  181. AEK
  182.  - This is a clone of the SCA virus and we get rid of it in the same
  183. manner
  184.  
  185. LSD 
  186.  - Another SCA clone and uses the same code
  187.  
  188. Byte Bandit  (Now 4 versions)
  189. (Amiga Freak)
  190.  - The Byte Bandit virus takes the DoIO() vector and re-directs it through
  191. itself.  Thus, any attempt to read or write the boot block (ie, AmigaDOS
  192. trying to figure out what kind of disk it is) results in the BB writing
  193. itself onto that disk.  We couldn't just rewrite the boot block, we have to
  194. get him out of RAM first.  This virus also has an interrupt that crashes the
  195. machine every 5 minutes or so after it's infected a few of your disks.  Ow.
  196. It stays in memory not via the Capture vectors, but by a Resident module.
  197. When machine looks crashed press these keys at the same time from left to
  198. right LAlt,LAmiga,Space,RAmiga,RAlt.
  199.  This will restore things for another 5 minutes
  200.  
  201. Revenge
  202.  - Basically, a Byte Bandit clone except it will bring up an obscene pointer
  203. a few minutes after you reboot.  We treat it much like the byte bandit.
  204.  
  205. Byte Warrior
  206.  - Jumps right into 1.2 Kickstart.  Won't work under 1.3.
  207.  Hangs around via Resident struct, doesn't do any damage.
  208.  
  209. North Star/ StarFire
  210.  - Like SCA, hangs around via CoolCapture, killing CoolCapture kills the
  211. North Star.
  212.  
  213. Obelisk Softworks Crew
  214.  - Hangs around via CoolCapture, also watches reads of DoIO() (but doesn't
  215. infect EVERY disk - only ones you boot off of)
  216.  
  217. IRQ
  218.  - This is the FIRST Non-Bootblock Virus.  It copies itself from place to
  219. place via the first executable program found in your startup-sequence.  It
  220. SetFunction's OldOpenLibrary(), has a KickTagPtr, and lives in the first
  221.  hunk of an infected program.
  222.  
  223. Pentagon Circle
  224.  - This one looks at the DoIO vector, and has a CoolCapture vector.  It will
  225. write itself over any virus inserted, but not onto anything else.  No
  226. danger, easy to eliminate.  Holding left button while booting with this one
  227. shows different screen colour, but doesn't get rid of it.
  228.  
  229. HCS Virus
  230.  - Hooks into the System Z protector
  231.  
  232.  - This is another virus protector that can write itself to disks.  Anything
  233. that spreads itself, under any name, is a virus.  Doesn't do anything except
  234. during a reboot, then examines disks and writes over viruses.
  235.  
  236. Disk-Doktors
  237.  - This is another virus which looks at the DoIO routine for the reading of
  238. any bootblocks.  If it finds one it will rewrite a copy of its code to it if
  239. it can.  This one also patches into the Vertical Blank interrupt and seems
  240. to format you disk after a certain number of interrupts (can't be sure
  241. though).The nasty bit is it also creates a task called clipboard.device
  242. which spends its life copying itself through memory fragmenting the memory
  243. into small blocks.  Calls ROM CODE direct so wont work under V1.3.  We
  244. restore the DoIO routine, the Vert Blank interrupt and RemTask the
  245. clipboard.device
  246.  
  247. LAMER Exterminator
  248.  - This virus was sent to me by Andrew Mercer of the Palmerston North group.
  249. His letter said that He noticed strange things on his disks.  On
  250. disassembling the virus I found that most of it was encrypted and the data
  251. was encrypted randomly using the beam position of the screen.  Thus it
  252. appears different each time.  It patches the trackdisk.device to look at
  253. reads and writes, It patches the Sumkick vector in exec in case someone
  254. tires to get rid of it.  When it detects a read or a write it will randomly
  255. select a sector on the disk and will check if it is a data block.  If it is
  256. it will write LAMER!  all over the sector and rewrite it.  Some say this
  257. Virus will write to write protected disks.  I have not had this happen to me
  258. and I can see no special code in the disassembly to accomplish this feat.
  259.  
  260. TimeBomb Virus
  261.  - This is a strange Virus.  It does not insert itself into any
  262. vectors.However it will copy itself back to the disk it came from.  When the
  263. count gets to 2 it will wipe out the Root Directory of the boot disk and
  264. display an alert.  If the count is over 2 it will just display and alert
  265.  
  266. GADAFFI Virus
  267.  - Inserts itself into the CoolCapture vector, Uses a RomTag structure and
  268. patches the DoIO vector Jumps directly into the Kickstart so will only work
  269. under V1.2 Kickstart.  After 13 copies it will Step the Heads of drives 0
  270. and 1 in and out.  We simply clear all vectors and Use the old V1.2 DoIO
  271. code entry point
  272.  
  273. BSG9 Virus 
  274. - This is similar to the IRQ virus in that it does not live in the Boot
  275. Block.  It operates differently.  Inserts itself into the RomTag pointer.
  276. It then loads the program it replaced and executes it.  On Reboot the RomTag
  277. is called.  It patches the Intuition OpenWindow Routine to its code.  It
  278. then returns.  Once AmigaDos opens up the CLI window the virus code gets
  279. run.  This gets the startup-sequence file and gets the first command that
  280. is run.  It then checks if it is already here.  No, then it moves this
  281. program from it's directory into the devs:  directory and renames it a
  282. strange name.It then copies itself to replace the command it just moved.  A
  283. give away is the file size.  The Virus size is 2608 bytes and there will be
  284. a file with what looks like spaces for its name in the devs:  directory.  To
  285. get rid of we copy the file in devs:  back to the c:  directory and rename
  286. it.Then delete the file in the devs:  directory.  In memory all we do is
  287. change the RT_INIT code which is run on reboot to do an immediate RTS The
  288. memory for the program is still used but the Virus is disabled.  It will
  289. display a screen of its own which says
  290.  A Computer Virus is a disease
  291.  Terrorism is a Transgression
  292.  Software Piracy is a crime
  293.  This is the Cure
  294.  BSG9 plus some other junk
  295.  
  296. War Hawks 
  297. - This Virus installs itself into the CoolCapture Vector.  It copies itself
  298. to the disk when the computer is warm booted.  After every four copies it
  299. displays a message.  To get rid of it we simply clear the CoolCapture vector
  300.  
  301. VKill Virus  
  302.  - This is another virus hidden as a Virus protector.  When booted it copies
  303. itself to the stack area that is not used.  It then patches the CoolCapture
  304. vector to survive a reboot.  It patches the PutMsg vector of ExecBase to
  305. watch for BootBlock reads and writes.When it finds one it checks it and
  306. tells you if a virus is present.If you want to get rid of it it will copy
  307. itself to the disk.To remove it we Clear the CoolCapture Vector and
  308. SetFunction the PutMsg vector
  309.  
  310. Ultra Fox
  311.  - This one lives in the CoolCapture vector.  When you reboot it will change
  312. the DoIO vector and wait for a BootBlock read.When it finds one and the disk
  313. is not already infected it will write itself to the bootblock.After every 16
  314. copies it will put a custom copper list which displays greetings
  315.  
  316. PVLProtector
  317.  - This one is another bootblock protector.When it finds a virus it will
  318. write itself to the disk instead of a proper bootblock.  All we do is set
  319. the RomTag to do a RTS
  320.  
  321. DosSpeed 
  322.  - This is another file virus.  It is supposed to speed up disk operations
  323. by 800%.  This was found on a BBS and when run patches itself into several
  324. places.  It will read the s:startup-sequence file on reboot and will edit it
  325. so that it runs itself as the program.  It sticks out because the first line
  326. in the startup-sequence will be blank.When the Checker finds it look in the
  327. Root directory and you will find what looks like a blank filename. Virus
  328. Checker will rename this virus for you. You can then delete the virus and
  329. alter your startup-sequence to get rid of the first blank line
  330.  
  331. UnKnown
  332.  - This is a virus that has no names anywhere and will only work under V1.2
  333. Kickstart.  Very easy to get rid of.
  334.  
  335. JITR Virus
  336.  - Very mild sort of virus this one.  Only writes itself to the BootBlock.
  337. Does nothing else.  Easily fixed by clearing the CoolCapture vector
  338.  
  339. MicroSystems
  340.  - Haven't got this one yet so can't tell you much about it.  Just have to
  341. restore a vector in the Exec.library and clear the Exec CoolCapture vector.
  342.  
  343. Xeno Virus
  344.  - This virus is a very nasty one in the way that it infects all programs
  345. that can be run. It does not need the program to be run but even someone
  346. doing a list or dir on a disk when the virus is present will infect all
  347. those other files on disk. It patches into the dos.library and takes over
  348. the OPEN,LOCK and LOADSEG calls in dos. This way it can intercept the files
  349. being looked at. It will copy itself to the start of every runnable program
  350. and alter the file so that it still works. There is also an encrypted
  351. message which says 'Greetings from the Xeno Virus' but I hav not worked out
  352. when this appears yet. To get rid of it from meory we have to reset the
  353. changed vectors. To get rid of it from the file is very much harder. First
  354. the file has to have the virus removed from the code. Then the relocation
  355. data pointers have to be changed so that everything still works.
  356. When Virus_Checker finds a file infected with the Xeno Virus it will tell
  357. you which file it is and bring up a requester. You can now check the files
  358. on drive zero for furthur viruses if you want. I will soon add a string
  359. gadget so that all drives can be checked.
  360.  
  361. 16 Bit Crew
  362.  - This virus does not do much and only infects disks that you boot with.
  363. To get rid of it from memory we clear the CoolCapture Vector and restore
  364. the DoIO vector.
  365.  
  366. New Alien Beat Virus
  367.  - This one will only work under Version 1.2 Kickstart as it jumps into
  368. the ROM code directly. To fix in memory we have to manually patch the
  369. DoIO vector and FindResident Vector with the correct values for 1.2.
  370. and clear the Capture vectors.
  371.  
  372. BlackFlash virus
  373.  - This virus will display a message after a certain ammount of copies of
  374. it have been made. It says that your computer is sick and has a virus. To
  375. remove it we just restore the DoIO vector and clear out the capture
  376. vectors.
  377.  
  378. Digital Emotions virus
  379.  - This is another tame virus. Only infects disks when it is rebooted.
  380. Clean out the Captures vectors and it is gone.
  381.  
  382. ScarFace Virus
  383.  - This takes over the BeginIO routine in the trackdisk.device to watch for
  384. reads and writes to the disk. When it finds one it will write itself to the
  385. disk. It also has a VertBlank intterupt which will do something after
  386. awhile. I think it only reboots the machine. It also has a romtag which we
  387. have to clear out.
  388.  
  389. Turk Virus
  390.  - Another simple virus. Does not do very much. Simple to get rid of
  391.  
  392. Joshua Virus
  393.  - Again, lives in the TrackDisk BeginIO and VertBlank Intterupt.
  394. Also has a RomTag to survive reboots. This one will display a sprite after
  395. so many intterupts. I am not sure what it looks like but maybe someone
  396. wants to wait until it is triggered. It counts intterupts. It will also
  397. infect every disk but in the drive that is not write protected. Data in it
  398. that says something is encoded. To remove we simply restore the BeginIO
  399. code and VertBlank Interrupt and wipe out the RomTag.
  400.  
  401. Butonic Virus
  402.  - This is another file type virus. It uses the DoIO vector to check for
  403. reads to the Root Block of a disk. It wil then write the virus to the disk
  404. and add it to the startup-sequence as the first instruction. The filename
  405. of the virus and its comment make it invisible when doing a dir but shows
  406. up with a list. This will also bring up GURU messages and change the title
  407. of the active window to some german stuff.
  408. To get rid of it we clear the ROMTAG, restore the DoIO vector and delete
  409. the file off the disk. You will need to remove the blank line from the
  410. startup-sequence where the virus was.
  411.  
  412. Centurions Virus
  413.  - Another file type virus. It hooks into the Trackdisk BEGINIO vector and
  414. waits for reads to the boot block of a disk. It changes the SumKickData
  415. vector so that it will survive a checksum. To get rid of it in memory we
  416. simply kill the RomTag vector, restore the SumKickData vector and patch the
  417. trackdisk code it uses to skip over the virus.
  418. When it finds a read to the bootblock it will check the write protect. It
  419. will then find the startup-sequence and find the name of the first command.
  420. It then looks for the command in the root directory, then the c directory.
  421. Once found it adds itself to the front of the file and is run when the
  422. startup-sequence is run again. Signs of infection are that it adds 3916
  423. bytes to the size of the file it infects.
  424. After every ten copies it will change the pointer to a smily face and a
  425. message will scroll across it
  426.